package user

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"project-im/config"
	"project-im/internal/model/dao"
)

func InfoUser(c *gin.Context) {
	value, _ := c.Get("userId")
	//a := value.(uint)
	var user dao.ImUser
	config.DB.Where("id=?", value).Limit(1).Find(&user)

	c.JSON(http.StatusOK, gin.H{
		"code": 200,
		"msg":  "查询成功",
		"data": user,
	})
}
